package cn.com.cifi.mars.mapper.mars;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.com.cifi.mars.entity.SysJob;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yyd
 * @since 2019-12-07
 */
public interface SysJobMapper extends BaseMapper<SysJob> {
	
	/**
	 * 根据code查询SysJob
	 * @param code
	 * @return
	 */
	SysJob selectJobByCode(@Param("code") String code);
	
	/**
	 * 锁定任务
	 * @param id
	 * @return
	 */
	int lockJob (@Param("code") String code);
	
	int lockJobById(@Param("id") Integer jobId);
	
	/**
	 * 重置任务
	 * @param id
	 * @return
	 */
	int resetJob (@Param("id") Integer id);
	
}
